home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / amos / AMOSList0993.lzh / AMOSLIST / 000065_amos-request@svcs1.digex.net_Wed Sep 8 04:53:13 1993.msg < prev    next >
Internet Message Format  |  1993-10-03  |  3KB

  1. Received: from nextsun.INS.CWRU.Edu by access.digex.net with SMTP id AA26741
  2.   (5.65c/IDA-1.4.4 for <mcox@access.digex.com>); Wed, 8 Sep 1993 04:53:11 -0400
  3. Received: from svcs1.digex.net by nextsun.INS.CWRU.Edu with SMTP (5.65b+ida+/CWRU-1.5.2-freenet-gw)
  4.     id AA10731; Wed, 8 Sep 93 04:51:44 -0400 (from amos-request@svcs1.digex.net for mcox@access.digex.com)
  5. Received: by svcs1.digex.net id AA02019
  6.   (5.65c/IDA-1.4.4 for amos-list-out); Wed, 8 Sep 1993 04:40:01 -0400
  7. Received: from access.digex.net by svcs1.digex.net with SMTP id AA02015
  8.   (5.65c/IDA-1.4.4 for <amos-list@svcs1.digex.net>); Wed, 8 Sep 1993 04:39:56 -0400
  9. Received: from sun2.nsfnet-relay.ac.uk by access.digex.net with SMTP id AA26060
  10.   (5.65c/IDA-1.4.4 for <amos-list@access.digex.net>); Wed, 8 Sep 1993 04:39:50 -0400
  11. Via: uk.ac.rutherford.informatics; Wed, 8 Sep 1993 09:38:22 +0100
  12. Received: from pecan by inf.rl.ac.uk; Wed, 8 Sep 93 09:38:10 BST
  13. Date: Wed, 8 Sep 93 09:35:21 BST
  14. From: mas@inf.rl.ac.uk
  15. Message-Id: <9309080835.AA01676@pecan>
  16. To: amos-list@access.digex.net
  17. Subject: Of Mice & Skidmarks...
  18. Status: RO
  19.  
  20.  
  21. For anyone who is interested, here's some code I knocked up to read a mouse
  22. plugged into the second mouse port. Now I'm not saying this is at all how
  23. it should be done in 'proper' AMOS programs, because it really needs to
  24. check the mouse counters at LEAST 100 times a second to stay accurate, but
  25. at least it shows how easy it is to do if someone cares to write a better
  26. interrupt driven version (*hint*)
  27.  
  28. BTW - I'm loading in the bank off the original AMOS disk that contains the
  29.       definition of the mouse pointer. AMOS Pro users can either try to
  30.       locate the same thing on their Pro system disk or just use any other
  31.       sprite bank they have lying around...
  32.  
  33.  
  34. Load "amos:amos_system/mouse.abk" : Cls : Curs Off 
  35.  
  36. MX=X Hard(160) : MY=Y Hard(100)
  37. DX=Peek($DFF00D) : DY=Peek($DFF00C)
  38.  
  39. Do 
  40.       
  41.    OLD_DX=DX : OLD_DY=DY
  42.    DX=Peek($DFF00D) : DY=Peek($DFF00C)
  43.  
  44.    DIFF=DX-OLD_DX
  45.    If DIFF<-127 Then DIFF=-255-DIFF
  46.    If DIFF>127 Then DIFF=255-DIFF
  47.    MX=MX+DIFF
  48.  
  49.    DIFF=DY-OLD_DY
  50.    If DIFF<-127 Then DIFF=-255-DIFF
  51.    If DIFF>127 Then DIFF=255-DIFF
  52.    MY=MY+DIFF
  53.       
  54.    Print "Left  Button =";Fire(1)
  55.    Print "Right Button =";-1-Btst(6,$DFF016)
  56.    Home : Sprite 2,MX,MY,1 : Poke $DFF034,192
  57.  
  58. Loop 
  59.  
  60.  
  61. The Poke to $DFF034 seems to be neccessary to keep the right mouse button
  62. check going, I think it resets the paddle capacitor line that the button makes
  63. use of. The left mouse button can be read using the normal joystick fire 
  64. button function.
  65.  
  66.  
  67.  
  68. On the subject of Skidmarks, I wasn't suggesting you should desert Amos and
  69. buy Blitz Basic instead ! Just that Amos could really use a similar sort of
  70. game to show it off. To be honest, Skidmarks could probably be done just the
  71. same in Amos anyway. It doesnt look like a vast amount of processing, just a
  72. large lowres screen with a couple of bobs moving around on it. 
  73.  
  74. Martin.